Optimal. Leaf size=89 \[ \frac {3 a \cos (e+f x)}{f \sqrt {a \sin (e+f x)+a}}-\frac {\cot (e+f x) \sqrt {a \sin (e+f x)+a}}{f}-\frac {\sqrt {a} \tanh ^{-1}\left (\frac {\sqrt {a} \cos (e+f x)}{\sqrt {a \sin (e+f x)+a}}\right )}{f} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.19, antiderivative size = 89, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.174, Rules used = {2716, 2981, 2773, 206} \[ \frac {3 a \cos (e+f x)}{f \sqrt {a \sin (e+f x)+a}}-\frac {\cot (e+f x) \sqrt {a \sin (e+f x)+a}}{f}-\frac {\sqrt {a} \tanh ^{-1}\left (\frac {\sqrt {a} \cos (e+f x)}{\sqrt {a \sin (e+f x)+a}}\right )}{f} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 206
Rule 2716
Rule 2773
Rule 2981
Rubi steps
\begin {align*} \int \cot ^2(e+f x) \sqrt {a+a \sin (e+f x)} \, dx &=-\frac {\cot (e+f x) \sqrt {a+a \sin (e+f x)}}{f}+\frac {\int \csc (e+f x) \left (\frac {a}{2}-\frac {3}{2} a \sin (e+f x)\right ) \sqrt {a+a \sin (e+f x)} \, dx}{a}\\ &=\frac {3 a \cos (e+f x)}{f \sqrt {a+a \sin (e+f x)}}-\frac {\cot (e+f x) \sqrt {a+a \sin (e+f x)}}{f}+\frac {1}{2} \int \csc (e+f x) \sqrt {a+a \sin (e+f x)} \, dx\\ &=\frac {3 a \cos (e+f x)}{f \sqrt {a+a \sin (e+f x)}}-\frac {\cot (e+f x) \sqrt {a+a \sin (e+f x)}}{f}-\frac {a \operatorname {Subst}\left (\int \frac {1}{a-x^2} \, dx,x,\frac {a \cos (e+f x)}{\sqrt {a+a \sin (e+f x)}}\right )}{f}\\ &=-\frac {\sqrt {a} \tanh ^{-1}\left (\frac {\sqrt {a} \cos (e+f x)}{\sqrt {a+a \sin (e+f x)}}\right )}{f}+\frac {3 a \cos (e+f x)}{f \sqrt {a+a \sin (e+f x)}}-\frac {\cot (e+f x) \sqrt {a+a \sin (e+f x)}}{f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] time = 0.99, size = 206, normalized size = 2.31 \[ \frac {\csc ^4\left (\frac {1}{2} (e+f x)\right ) \sqrt {a (\sin (e+f x)+1)} \left (4 \sin \left (\frac {1}{2} (e+f x)\right )+2 \sin \left (\frac {3}{2} (e+f x)\right )-4 \cos \left (\frac {1}{2} (e+f x)\right )+2 \cos \left (\frac {3}{2} (e+f x)\right )-\sin (e+f x) \log \left (-\sin \left (\frac {1}{2} (e+f x)\right )+\cos \left (\frac {1}{2} (e+f x)\right )+1\right )+\sin (e+f x) \log \left (\sin \left (\frac {1}{2} (e+f x)\right )-\cos \left (\frac {1}{2} (e+f x)\right )+1\right )\right )}{f \left (\cot \left (\frac {1}{2} (e+f x)\right )+1\right ) \left (\csc \left (\frac {1}{4} (e+f x)\right )-\sec \left (\frac {1}{4} (e+f x)\right )\right ) \left (\csc \left (\frac {1}{4} (e+f x)\right )+\sec \left (\frac {1}{4} (e+f x)\right )\right )} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.44, size = 279, normalized size = 3.13 \[ \frac {{\left (\cos \left (f x + e\right )^{2} - {\left (\cos \left (f x + e\right ) + 1\right )} \sin \left (f x + e\right ) - 1\right )} \sqrt {a} \log \left (\frac {a \cos \left (f x + e\right )^{3} - 7 \, a \cos \left (f x + e\right )^{2} - 4 \, {\left (\cos \left (f x + e\right )^{2} + {\left (\cos \left (f x + e\right ) + 3\right )} \sin \left (f x + e\right ) - 2 \, \cos \left (f x + e\right ) - 3\right )} \sqrt {a \sin \left (f x + e\right ) + a} \sqrt {a} - 9 \, a \cos \left (f x + e\right ) + {\left (a \cos \left (f x + e\right )^{2} + 8 \, a \cos \left (f x + e\right ) - a\right )} \sin \left (f x + e\right ) - a}{\cos \left (f x + e\right )^{3} + \cos \left (f x + e\right )^{2} + {\left (\cos \left (f x + e\right )^{2} - 1\right )} \sin \left (f x + e\right ) - \cos \left (f x + e\right ) - 1}\right ) - 4 \, {\left (2 \, \cos \left (f x + e\right )^{2} + {\left (2 \, \cos \left (f x + e\right ) + 3\right )} \sin \left (f x + e\right ) - \cos \left (f x + e\right ) - 3\right )} \sqrt {a \sin \left (f x + e\right ) + a}}{4 \, {\left (f \cos \left (f x + e\right )^{2} - {\left (f \cos \left (f x + e\right ) + f\right )} \sin \left (f x + e\right ) - f\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.79, size = 125, normalized size = 1.40 \[ \frac {\left (1+\sin \left (f x +e \right )\right ) \sqrt {-a \left (\sin \left (f x +e \right )-1\right )}\, \left (\sin \left (f x +e \right ) \left (2 \sqrt {a -a \sin \left (f x +e \right )}\, a^{\frac {3}{2}}-\arctanh \left (\frac {\sqrt {a -a \sin \left (f x +e \right )}}{\sqrt {a}}\right ) a^{2}\right )-\sqrt {a -a \sin \left (f x +e \right )}\, a^{\frac {3}{2}}\right )}{\sin \left (f x +e \right ) a^{\frac {3}{2}} \cos \left (f x +e \right ) \sqrt {a +a \sin \left (f x +e \right )}\, f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \sqrt {a \sin \left (f x + e\right ) + a} \cot \left (f x + e\right )^{2}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.01 \[ \int {\mathrm {cot}\left (e+f\,x\right )}^2\,\sqrt {a+a\,\sin \left (e+f\,x\right )} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \sqrt {a \left (\sin {\left (e + f x \right )} + 1\right )} \cot ^{2}{\left (e + f x \right )}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________